module.exports = () => {
  function render(json) {
      // 中文乱码文字 charset=utf-8 解决
      this.set("Content-Type", "application/json; charset=utf-8")
      this.body = JSON.stringify(json)
  }
  return async (ctx, next) => {
      ctx.send = render.bind(ctx)
      await next()
  }
}